/*
动态添加路由
*/
const fs = require('fs')
const Router = require('koa-router')
const router = new Router()

fs.readdirSync(__dirname + '/controller').forEach(file=>{
    //if(file !== 'config.js'){
        let r = require('./controller/'+file)
        router.use(r.routes())
    //}
})

module.exports = router